/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BLL;

import DAL.DALImport;
import DTO.DTOImport;
import DTO.DTOStatistic;
import java.util.ArrayList;

/**
 *
 * @author Pham
 */
public class BLLImport implements IBLLImport{
    DALImport dalImp;
    
    public BLLImport()
    {
        dalImp = new DALImport();
    }
    
    
    @Override
    public boolean insertRowImport(DTOImport dtoImp)
    {
        try
        {
            if(dalImp.importProduct(dtoImp))
                return true;
            return false;
        }
        catch(Exception ex)
        {
            System.err.printf(ex.getMessage());
            return false;
        }
    }
    
    @Override
    public ArrayList<DTOStatistic> statisticImport(String month, String year)
    {
        return dalImp.statisticImport(month, year);
    }
    
    @Override
    public ArrayList<DTOImport> getImports()
    {
        return dalImp.getImports();
    }
//    public DTOImport getImportbyID(int ImportID)
//    {
//        try{
//            
//        }
//        catch(Exception ex)
//        {
//            System.err.printf(ex.getMessage());
//        }
//    }
}
interface IBLLImport{
    public boolean insertRowImport(DTOImport dtoImp);
    public ArrayList<DTOStatistic> statisticImport(String month, String year);
    public ArrayList<DTOImport> getImports();
//    public  getImportbyID(int ImportID);
}